package com.itheima.inreader;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class FileReaderDemo {

    public static void main(String[] args) throws IOException {

        //public FileReader(String fileName)

        FileReader fileReader = new FileReader("day11\\a.txt");

        /*int a = -1;
        while ((a=fileReader.read())!=-1){
            System.out.println((char)a);
        }*/

        char[] chars = new char[1024];
        int a = -1;
        while ((a=fileReader.read(chars))!=-1){
            System.out.println(new String(chars,0,a));
        }

        fileReader.close();
    }
}
